<template>
	<view>
		<!-- 个人信息 -->
		<view class="top">
			<img src="../../static/购物车.png" alt="" class="toolimg1">
			<img src="../../static/设置.png" alt="" class="toolimg">
			<img :src="`${IMG_URL}${avator}`" class="avatar">
			<text class="username"> {{uname}}</text>
			<text class="idnum">id:{{uid}}</text>
		</view>
		<view class="content">
			<view class="">
				<text>我的收藏</text>
				<text>></text>
			</view>
			
			<view class="order">
				<text>我的订单</text>
				<text @click="toOrder">></text>
				<view class="iconimg">
					<view>
						<img src="../../static/钱包.png" alt="" class='icon'>
						<text>待付款</text>
					</view>
					<view>
						<img src="../../static/时钟.png" alt="" class='icon'>
						<text>待使用</text>
					</view>
					<view>
						<img src="../../static/信息.png" alt="" class='icon'>
						<text>待评价</text>
					</view>
					<view>
						<img src="../../static/退还-详情.png" alt="" class='icon'>
						<text>退款/售后</text>
					</view>
				</view>
			</view>
			
			<view class="">
				<text>邀请好友</text>
				<text>></text>
			</view>
			
			<view class="">
				<text>问题反馈</text>
				<text>></text>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		userStore
	} from '../../store/userstore.js'
	import { IMG_URL } from "@/utils/imgStatic";
	
	const userstore = userStore()
	
	const uid = userstore.userId
	const uname = userstore.username
	const avator = userstore.avator
	
	const toOrder = ()=>{
		uni.switchTab({
			url: '/pages/order/order'
		})
	}
	
</script>

<style scoped>
	.avatar{
		width: 90px;
		height: 90px;
		border-radius: 100%;
		margin-top: 60px;
		margin-left: 20px;
	}
	.username{
		display: block;
		margin-top: 8px;
		margin-left: 23px;
		font-size: 20px;
		font-weight: bold;
	}
	.idnum{
		display: block;
		margin-top: 3px;
		margin-left: 23px;
		font-size: 13px;
		color: darkgray;
	}
	.content{
		margin: 20px;
		margin-top: 40px;
	}
	.content>view{
		background-color: #F5F5F5;
		border-radius: 15px;
		margin-bottom: 15px;
		position: relative;
	}
	.content>view>text{
		display: inline-block;
		margin: 18px;
	}
	.content>view>text:first-child{
		font-weight: bold;
		font-size: 16px;
	}
	.content>view>text:nth-child(2){
		position: absolute;
		left: 300px;
		color: darkgray;
	}
	.iconimg>view{
		display: inline-block;
		margin-bottom: 20px;
	}
	.icon{
		width: 43px;
		height: 43px;
		display: block;
		margin: 0 19px;
	}
	.iconimg>view>text{
		font-size: 14px;
		margin: 0 19px;
	}
	.top{
		position: relative;
	}
	.toolimg{
		width: 20px;
		height: 20px;
		position: absolute;
		top:20px;
		left: 350px;
	}
	.toolimg1{
		width: 22px;
		height: 22px;
		position: absolute;
		top:20px;
		left: 300px;
	}
</style>
